package run;

import misc.ChecksumRule;
import misc.Properties;
import basic.Key;
import basic.Sequence;

public class Test {

	public static void main(String[] args){
		/*
		Key key = new Key();
		Sequence[] sequences = {key.addSequence("1B4D").subSequence(1, 3),key.addSequence("CV74").subSequence(1, 3),
				key.addSequence("8MM2").subSequence(1, 3),key.addSequence("JKL1").subSequence(1, 3), key.addSequence("23HG").subSequence(1, 3)};
		Key k = new Key(sequences);
		System.out.println(k.getKey());
		String sum = "";
		for (int i = 0; i < k.getSequences().length; i++){
				sum = sum + k.getSequenceAt(i).getSum() +"-";
			
		}
		System.out.println(sum.subSequence(0, sum.length()-1));
		
		System.out.println(key.isFirstGenerated());
		System.out.println(key.isGenerated(3));
		System.out.println(key.isLastGenerated());
		*/
		/*Key key = new Key(3);
		key.addSequenceAt("4D2S", 2);
		System.out.println(key.getKey());
		System.out.println(key.isFirstGenerated());
		System.out.println(key.isGenerated(0));
		System.out.println(key.isGenerated(2));
		System.out.println(key.isLastGenerated());
		*/
		
		int interval = 35;
		int sequenceLenght = 5;
		//String abc = "abcdefghijklmnopqrstuvwxyz";
		Properties prop = new Properties(interval,sequenceLenght, 
				ChecksumRule.defaultRule(interval, sequenceLenght));
		/*
		 for (char c : abc.toCharArray()) {
		//prop.setCharValue('c', 20);
		System.out.println(prop.getCharacterValue().getChar(c));
		}
		*/
		Loader loader = new Loader();
		//loader.saveProperties();
	}
}
